package com.yc.ycpaimon.ui

import android.content.Context
import android.content.Intent
import com.yc.ycpaimon.base.BaseActivity
import com.yc.ycpaimon.data.constant.Constants
import com.yc.ycpaimon.databinding.BbsWebViewActivityBinding
import com.yc.ycpaimon.utils.WebUtil
import com.yc.ycpaimon.utils.WebUtil.ycSettingInit

/**
 * Creator: yc
 * Date: 2022/2/17 17:21
 * UseDes:通过米游社网页版获取token
 */
class BbsWebViewActivity : BaseActivity<BbsWebViewActivityBinding>(BbsWebViewActivityBinding::inflate) {
    companion object {
        @JvmStatic
        fun newInstance(context: Context) {
            context.startActivity(Intent(context, BbsWebViewActivity::class.java))
        }

    }

    override fun BbsWebViewActivityBinding.initView() {
        webView.apply {
            settings.ycSettingInit()
            webViewClient = WebUtil.createBbsWebClient {

            }
            loadUrl(Constants.BBS_LOGIN_URL)
        }
    }
}